Clean up DESTDIR handling. Default install is to root
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 5 Oct 2005 14:05:38 +0000 (15:05 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 5 Oct 2005 14:05:38 +0000 (15:05 +0100)
directory (/). This is only overridden automatically
for the 'make dist' targets and their legacy aliases
(make {xen,tools,kernels,docs}).

Signed-off-by: Keir Fraser <keir@xensource.com>
Config.mk
Makefile
buildconfigs/Rules.mk
linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c
xen/Makefile

index 6f104e99e328f2a2b264c55aea1e298d911fa4af..7bed4b8fe828a5cb913f6492de5a0a677ad708fa 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -20,9 +20,7 @@ STRIP      = $(CROSS_COMPILE)strip
 OBJCOPY    = $(CROSS_COMPILE)objcopy
 OBJDUMP    = $(CROSS_COMPILE)objdump
 
-# Default is to install to local 'dist' directory.
-DISTDIR ?= $(XEN_ROOT)/dist
-DESTDIR ?= $(DISTDIR)/install
+DISTDIR     ?= $(XEN_ROOT)/dist
 
 INSTALL      = install
 INSTALL_DIR  = $(INSTALL) -d -m0755
index 91ee5b043a35598e15f57e0f4c9d811a5899918e..b0934178399cc0802c4d145f1fba6b0e5ff7725e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -37,23 +37,33 @@ build: kernels
        $(MAKE) -C docs build
 
 # build and install everything into local dist directory
-dist: xen kernels tools docs
+dist: DESTDIR=$(DISTDIR)/install
+dist: dist-xen dist-kernels dist-tools dist-docs
        $(INSTALL_DIR) $(DISTDIR)/check
        $(INSTALL_DATA) ./COPYING $(DISTDIR)
        $(INSTALL_DATA) ./README $(DISTDIR)
        $(INSTALL_PROG) ./install.sh $(DISTDIR)
        $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
+dist-%: DESTDIR=$(DISTDIR)/install
+dist-%: install-%
+       @: # do nothing
+
+# Legacy dist targets
+xen: dist-xen
+tools: dist-tools
+kernels: dist-kernels
+docs: dist-docs
 
-xen:
+install-xen:
        $(MAKE) -C xen install
 
-tools:
+install-tools:
        $(MAKE) -C tools install
 
-kernels:
+install-kernels:
        for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
 
-docs:
+install-docs:
        sh ./docs/check_pkgs && $(MAKE) -C docs install || true
 
 dev-docs:
@@ -109,10 +119,6 @@ install-iptables:
        tar -jxf iptables-1.2.11.tar.bz2
        $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
 
-install-%: DESTDIR=
-install-%: %
-       @: # do nothing
-
 help:
        @echo 'Installation targets:'
        @echo '  install          - build and install everything'
@@ -151,7 +157,6 @@ help:
        @echo '                     with extreme care!)'
 
 # Use this target with extreme care!
-uninstall: DESTDIR=
 uninstall: D=$(DESTDIR)
 uninstall:
        [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
index a75bd47b0c859e64ddaf9a915176d8fc61c0e7d8..e44a84e5427718fd3b525e102e476f137b201afa 100644 (file)
@@ -1,11 +1,6 @@
 
 include Config.mk
 
-# We expect these two to already be set if people 
-# are using the top-level Makefile
-DISTDIR        ?= $(CURDIR)/dist
-DESTDIR        ?= $(DISTDIR)/install
-
 export DESTDIR
 
 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
index db8cbed8cd9bcb2486d07c0784bdc0b40dce8544..4fdeed1bd5422a5fdb0707e582cecb83e396cd9a 100644 (file)
@@ -94,7 +94,7 @@ void enable_hlt(void)
 }
 
 EXPORT_SYMBOL(enable_hlt);
-
+#define xxprint(msg) HYPERVISOR_console_io(CONSOLEIO_write, strlen(msg), msg)
 /* XXX XEN doesn't use default_idle(), poll_idle(). Use xen_idle() instead. */
 extern void stop_hz_timer(void);
 extern void start_hz_timer(void);
@@ -121,10 +121,17 @@ extern void smp_resume(void);
 /* We don't actually take CPU down, just spin without interrupts. */
 static inline void play_dead(void)
 {
+    char foo[100];
+
+    sprintf(foo, "cpu=%d stack=%p\n", smp_processor_id(), foo);
+    xxprint(foo);
+
        /* Death loop */
        while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE)
                HYPERVISOR_sched_op(SCHEDOP_yield, 0);
 
+        xxprint("Out of loop\n");
+
        __flush_tlb_all();
    /* 
     * Restore IPI/IRQ mappings before marking online to prevent 
@@ -169,10 +176,15 @@ void cpu_idle (void)
                        rmb();
 
                        if (cpu_is_offline(cpu)) {
+                            char foo[100];
                                local_irq_disable();
 #ifdef CONFIG_SMP
                                smp_suspend();
 #endif
+
+                                sprintf(foo, "X cpu=%d stack=%p\n",
+                                        cpu, &cpu);
+                                xxprint(foo);
 #if defined(CONFIG_XEN) && defined(CONFIG_HOTPLUG_CPU)
                                /* Ack it.  From this point on until
                                   we get woken up, we're not allowed
index 58eb34a88ab8690186f3d06528d1f53901e429d9..778f77ae46ad33b68e177b7c00efd4a857f317f4 100644 (file)
@@ -1,7 +1,3 @@
-# Default is to install to local 'dist' directory.
-DISTDIR ?= ../dist
-DESTDIR ?= $(DISTDIR)/install
-
 INSTALL                        = install
 INSTALL_DATA           = $(INSTALL) -m0644
 INSTALL_DIR            = $(INSTALL) -d -m0755